<?php

/**
 * a2zVideoAPI, the API for video inforamtion
 *
 * PHP versions 4 and 5
 *
 *
 * @category   video
 * @package    API
 * @author     Sandeep Verma <svnlabs@gmail.com>
 * @version    1.0
 * @link       http://www.svnlabs.com/a2zvideoapi/index.php
 * @blog       http://blog.svnlabs.com/
 * @since      28 March 2010
 
 Some API supported URL:
	http://www.youtube.com/watch?v=mXMf9GOzzOA
	http://www.dailymotion.com/video/x5z91e_lets-play-holi_music
	http://video.google.com/videoplay?docid=-7577046582869136330&hl=en
	http://www.vimeo.com/9573920
	http://www.metacafe.com/watch/4230785/ghetto_star_weekly_randy_radermacher/
	http://blip.tv/file/3272712?utm_source=featured_ep&utm_medium=featured_ep
	http://www.hulu.com/watch/131066/saturday-night-live-we-are-the-world-cold-open
	http://www.viddler.com/explore/coop/videos/54/
	http://www.5min.com/Video/How-to-Organize-Your-Life-219728873
	http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=51722257
	http://vodpod.com/watch/2492783-reactos-install-screencast-tutorial
	http://www.ehow.com/video_4983481_change-ip-address-windows-vista.html
	http://www.break.com/usercontent/2009/4/How-to-Run-Linux-on-Windows-Ubuntu-699185.html
	http://www.atom.com/funny_videos/sw_gangsta_rap_chronicles/
	http://www.funnyordie.com/videos/4d47a07835/danny-mendlow-the-solution-to-racism-and-the-biggest-issue-in-the-world
	http://www.flickr.com/photos/traceytilson/3033319841/ 
 
 */

$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);


/* Video API Server */
curl_setopt($ch, CURLOPT_URL, 'http://www.svnlabs.com/a2zvideoapi/server.php');
curl_setopt($ch, CURLOPT_POST, true);

/* Request variables URL & Format for API server  */
$post = array(
              'url'    => "http://www.flickr.com/photos/schwartzray/2483697739/",
              'format'    => "json" 
);

curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

$result = curl_exec($ch);
$response = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

/* Output from a2zVideoAPI */
if($response==200)
echo $result;

?>